<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>day07_demo04</title>
<script>
	//location
	function f1(){
		var b=confirm("您确定要离开本页吗?");		
		if(b){
			location.href="http://www.tmooc.cn";
			
		}
	}
	
	function f2(){
		location.reload();
		
	}
	
	function f3(){
		history.forward();	
		
	}
	//screen
	console.log(screen.width);
	console.log(screen.height);
	//navigator
	console.log(navigator.userAgent)
	
</script>

</head>
<body>
	<input type="button" value="达内"
		onclick="f1();"/>
		
	<input type="button" value="刷新"
		onclick="f2();"	/>
	<input type="button" value="前进"
		onclick="f3();"	/>
		
		
</body>
</html>














